-
Notifications
You must be signed in to change notification settings - Fork 54
Reachability: use NSURLSession for MacOS 10.14 or higher #1323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@absaroj, @eduardo-camacho - Can you help in reviewing this. Thanks. |
@absaroj , @eduardo-camacho : Reminder to review code for Mac/iOS |
8c32fe3
to
2b63632
Compare
710bfd3
to
6924349
Compare
Hi @eduardo-camacho and @absaroj, @abuhsayem has been waiting for review on this for some time. Could one of you review soon please? |
{ | ||
// Use URLSession for macOS 10.14 or higher | ||
NSString *formattedHostname = hostname; | ||
if (![formattedHostname hasPrefix:@"https://"] && ![formattedHostname hasPrefix:@"http://"]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would just checking with "http" prefix be enough?
Reachability uses SCNetworkReachabilityRef library which is deprecated in MacOS 10.14 or higher.
Hence, Use NSURLSession for MacOS 10.14 or higher in cpp_client_telemetry/third_party/Reachability and have backward compatibility with SCNetworkReachabilityRef library for versions lower than MacOS 10.14